gtk4.git
8 years agoscalebutton: Add autoscrolling
Matthias Clasen [Wed, 13 Dec 2017 03:21:43 +0000 (22:21 -0500)]
scalebutton: Add autoscrolling

Use the smooth autoscrolling that the scale can do,
and at the same time stop using legacy event signals.

8 years agobutton: Add private api to get at the gesture
Matthias Clasen [Wed, 13 Dec 2017 03:18:19 +0000 (22:18 -0500)]
button: Add private api to get at the gesture

Attaching another gesture from the outside does not
work currently, so let widgets share their button's
gesture for now.

8 years agorange: Add private api to autoscroll
Matthias Clasen [Wed, 13 Dec 2017 03:17:49 +0000 (22:17 -0500)]
range: Add private api to autoscroll

This will be used to scroll the scale in scale buttons.

8 years agopath bar: Drop non-functional hold-to-scroll code
Matthias Clasen [Wed, 13 Dec 2017 01:49:31 +0000 (20:49 -0500)]
path bar: Drop non-functional hold-to-scroll code

Scrolling a path bar is of marginal usefulness - you need to
find a really deep place in your filesystem hierarchy in order
to scroll one or two places at best. And the code we had for
this was not working. And it was using legacy event handlers.
Instead of fixing it, remove it.

8 years agox11: Refactor xevent filtering some more
Benjamin Otte [Wed, 13 Dec 2017 00:53:17 +0000 (01:53 +0100)]
x11: Refactor xevent filtering some more

We now have a GdkX11Display::xevent signal that gets emitted for every
XEvent and allows you to interrupt processing via TRUE/FALSE return
values.
These return values to correspond to GDK_FILTER_REMOVE and
GDK_FILTER_CONTINUE respectively.

The GDK_FILTER_TRANSLATE case from gdk_window_add_filter() is now meant
to be handled via gdk_display_put_event().

8 years agowidget-factory: Avoid a legacy event handler
Matthias Clasen [Wed, 13 Dec 2017 00:13:52 +0000 (19:13 -0500)]
widget-factory: Avoid a legacy event handler

We can use a gesture instead, here.

8 years agox11: Use GdkX11Display::translate-event more
Benjamin Otte [Wed, 13 Dec 2017 00:09:32 +0000 (01:09 +0100)]
x11: Use GdkX11Display::translate-event more

8 years agox11: Make clipboard use translate-event signal
Benjamin Otte [Tue, 12 Dec 2017 23:56:05 +0000 (00:56 +0100)]
x11: Make clipboard use translate-event signal

8 years agogdk: Clean up marshalers
Benjamin Otte [Tue, 12 Dec 2017 23:47:07 +0000 (00:47 +0100)]
gdk: Clean up marshalers

Don't generate marshallers that are not needed.

Use the default ones if they exist.

8 years agox11: Add GdkX11Display:translate-event signal
Benjamin Otte [Tue, 12 Dec 2017 23:43:30 +0000 (00:43 +0100)]
x11: Add GdkX11Display:translate-event signal

This is supposed to replace gdk_window_add_filter() in the long run.

8 years agox11: Constify XEvent usage
Benjamin Otte [Tue, 12 Dec 2017 23:39:32 +0000 (00:39 +0100)]
x11: Constify XEvent usage

8 years agogdk: Remove gdk_event_put(), peek() etc
Benjamin Otte [Tue, 12 Dec 2017 23:35:16 +0000 (00:35 +0100)]
gdk: Remove gdk_event_put(), peek() etc

We don't want to treat events like they don't belong to displays. So
instead, people should use gdk_display_put/peek/get_event().

8 years agox11: Refactor code
Benjamin Otte [Tue, 12 Dec 2017 14:25:34 +0000 (15:25 +0100)]
x11: Refactor code

This is in preparation for DND.

It moves a lot of code from gdkclipboard-x11.c to
gdkselectionoutputstream-x11.c to untangle it from GdkX11Clipboard
usage.

8 years agogdk: Remove unused function
Benjamin Otte [Tue, 12 Dec 2017 02:00:03 +0000 (03:00 +0100)]
gdk: Remove unused function

Fun fact: This function was never used.

8 years agoa11y: drop the focus tracker
Matthias Clasen [Tue, 12 Dec 2017 19:49:44 +0000 (14:49 -0500)]
a11y: drop the focus tracker

This code was doing horrible things, and the atk documentation
for the focus tracking feature says that this is deprecated and
not used anymore. So lets not do it.

8 years agoplacesview: Make middle click work
Matthias Clasen [Tue, 12 Dec 2017 18:56:15 +0000 (13:56 -0500)]
placesview: Make middle click work

This does not cost us much, and improves consistency.

8 years agoDeprecate many legacy event signals
Matthias Clasen [Tue, 12 Dec 2017 16:04:49 +0000 (11:04 -0500)]
Deprecate many legacy event signals

Mark the following signals as deprecated:
event, event-after, button-press-event, button-release-event,
touch-event, scroll-event, motion-notify-event, enter-notify-event,
leave-notify-event, property-notify-event, selection-clear-event,
selection-request-event, selection-notify-event, selection-received,
selection-get, proximity-in-event, proximity-out-event. Most
of these have suitable replacements in event controllers and
gestures already. The selection-related signals will soon be
irrelevant when selection handling moves to GDK.

Set G_ENABLE_DIAGNOSTIC=1 to see deprecation
warnings for uses of these signals.

8 years agoInstall gtkeventcontrollermotion.h
Matthias Clasen [Tue, 12 Dec 2017 15:38:11 +0000 (10:38 -0500)]
Install gtkeventcontrollermotion.h

Public headers need to be listed in gtk/meson.build.
This was overlooked when I added the controller.

8 years agoUpdate POTFILES.in
Piotr Drąg [Tue, 12 Dec 2017 15:33:22 +0000 (16:33 +0100)]
Update POTFILES.in

8 years agoAdd GtkEventControllMotion to the docs
Matthias Clasen [Tue, 12 Dec 2017 15:23:48 +0000 (10:23 -0500)]
Add GtkEventControllMotion to the docs

8 years agopaned: Stop using motion notify
Matthias Clasen [Tue, 12 Dec 2017 00:27:35 +0000 (19:27 -0500)]
paned: Stop using motion notify

We can use the new motion event controller that
was introduced for this purpose.

8 years agoabout dialog: Stop using event-after as well
Matthias Clasen [Tue, 12 Dec 2017 00:00:24 +0000 (19:00 -0500)]
about dialog: Stop using event-after as well

We can just use a multipress gesture for this purpose.

8 years agoabout dialog: Stop using motion notify
Matthias Clasen [Mon, 11 Dec 2017 23:46:47 +0000 (18:46 -0500)]
about dialog: Stop using motion notify

We can use the new motion event controller for this.

8 years agolabel: Use GtkEventControllerMotion
Matthias Clasen [Mon, 11 Dec 2017 23:30:22 +0000 (18:30 -0500)]
label: Use GtkEventControllerMotion

This lets us avoid legacy event signals here.

8 years agoAdd a simple motion eventcontroller
Matthias Clasen [Mon, 11 Dec 2017 23:29:33 +0000 (18:29 -0500)]
Add a simple motion eventcontroller

This can serve as a replacement for the legacy
event signals for enter/leave/motion notify.

8 years agoTry to make a composite entry
Matthias Clasen [Mon, 11 Dec 2017 05:02:21 +0000 (00:02 -0500)]
Try to make a composite entry

This is an attempt to see how much work is needed to
reproduce entry icons by just putting an entry and images
in a box, with some css glue.

8 years agoplacessidebar: Don't use root coordinates
Benjamin Otte [Mon, 11 Dec 2017 21:58:33 +0000 (22:58 +0100)]
placessidebar: Don't use root coordinates

8 years agodnd: Pass device, not event
Benjamin Otte [Mon, 11 Dec 2017 21:55:54 +0000 (22:55 +0100)]
dnd: Pass device, not event

You don't start a dnd operation with a device, you start it with an
event.

8 years agodnd: No longer allow passing -1
Benjamin Otte [Mon, 11 Dec 2017 21:34:13 +0000 (22:34 +0100)]
dnd: No longer allow passing -1

Nobody ever does that and special cases are evil.

8 years agodnd: Remove button argument from drag_begin()
Benjamin Otte [Mon, 11 Dec 2017 21:26:26 +0000 (22:26 +0100)]
dnd: Remove button argument from drag_begin()

It was unused.

8 years agocalendar: Stop using a legacy event handler
Matthias Clasen [Mon, 11 Dec 2017 03:15:12 +0000 (22:15 -0500)]
calendar: Stop using a legacy event handler

Replace the motion_notify handler by a drag gesture.

8 years agoAdwaita: Set an icon size for drag icons
Matthias Clasen [Mon, 11 Dec 2017 02:17:13 +0000 (21:17 -0500)]
Adwaita: Set an icon size for drag icons

This makes drag icons set from icon names come out
at a size that it large enough to not disappear under
the drag cursor.

8 years agoSet a style class for drag icons
Matthias Clasen [Mon, 11 Dec 2017 02:16:31 +0000 (21:16 -0500)]
Set a style class for drag icons

This lets us use the new icon-size machinery to
ensure we don't have tiny drag icons when using
named icons.

8 years agogdk: Remove gdk_drag_manage_dnd()
Benjamin Otte [Mon, 11 Dec 2017 00:45:31 +0000 (01:45 +0100)]
gdk: Remove gdk_drag_manage_dnd()

Instead, pass the actions as part of gdk_drag_begin() and insist DND is
always managed.

A new side effect is that gdk_drag_begin() can now return %NULL.

8 years agodnd: No point in determining the keyboard
Benjamin Otte [Sun, 10 Dec 2017 23:59:14 +0000 (00:59 +0100)]
dnd: No point in determining the keyboard

We only use the pointer.

8 years agodnd: Pass dx/dy instead of x_root/y_root
Benjamin Otte [Sun, 10 Dec 2017 23:55:56 +0000 (00:55 +0100)]
dnd: Pass dx/dy instead of x_root/y_root

This way, we don't need root coordinates when computing the dnd start
position.

8 years agodnd: Make gdk_drag_context_set_device() private
Benjamin Otte [Sun, 10 Dec 2017 23:17:36 +0000 (00:17 +0100)]
dnd: Make gdk_drag_context_set_device() private

There's no need to call it from GTK anymore, because we pass the device
to gdk_drag_begin().

8 years agocalendar: Don't request drag data on every motion event
Benjamin Otte [Sun, 10 Dec 2017 19:18:08 +0000 (20:18 +0100)]
calendar: Don't request drag data on every motion event

At least wait until we've received the previous one.

8 years agogdk: Remove outdated gdk_drag_begin() alternatives
Benjamin Otte [Sun, 10 Dec 2017 13:20:59 +0000 (14:20 +0100)]
gdk: Remove outdated gdk_drag_begin() alternatives

There's only one that's ever used, so delete the others and rename this
one to gdk_drag_begin().

8 years agolink button: Set a drag icon
Matthias Clasen [Sun, 10 Dec 2017 19:05:01 +0000 (14:05 -0500)]
link button: Set a drag icon

It is a bit odd to drag nothing around, so set an icon.

8 years agodocs: Don't mention css for setting cursors
Matthias Clasen [Sun, 10 Dec 2017 04:59:31 +0000 (23:59 -0500)]
docs: Don't mention css for setting cursors

We don't have a plan to make this work, so lets not
talk about it in the docs.

8 years agoentry: Allocate the progress bar only what it needs
Matthias Clasen [Sun, 10 Dec 2017 04:48:35 +0000 (23:48 -0500)]
entry: Allocate the progress bar only what it needs

We were allocating the progress bar to the full size
of the entry. This made entry icons loose their cursors,
since they were 'covered' by the progress bar, even though
it doesn't draw anything there.

8 years agoFix updating the widget accessible description when using its tooltip
Colomban Wendling [Mon, 20 Feb 2017 16:39:40 +0000 (17:39 +0100)]
Fix updating the widget accessible description when using its tooltip

We need to notify ATK the description changed when the tooltip text associated
with the widget changes and gtk_widget_accessible_get_description() would use
it as the description.

https://bugzilla.gnome.org/show_bug.cgi?id=779009

8 years agoFix irregular gdk_frame_clock_get_frame_time
Daniel van Vugt [Fri, 15 Sep 2017 09:49:12 +0000 (17:49 +0800)]
Fix irregular gdk_frame_clock_get_frame_time

This fixes stuttering in animations that rely on the regularity of
gdk_frame_clock_get_frame_time.

https://bugzilla.gnome.org/show_bug.cgi?id=787665

BEFORE
gdkgears:
58 FPS and visibly stuttering
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
"paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
"paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs

AFTER
gdkgears:
60 FPS and smoother
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs

8 years agodnd: Remove "delete" argument from gtk_drag_finish()
Benjamin Otte [Sun, 10 Dec 2017 00:33:38 +0000 (01:33 +0100)]
dnd: Remove "delete" argument from gtk_drag_finish()

The argument is ignored by anything but X11.
It's treated like suggested_action == MOVE.

So do that in gtk_drag_finish(), too.

8 years agodnd: Introduce gdk_drop_read_async() and use it
Benjamin Otte [Sun, 10 Dec 2017 00:05:37 +0000 (01:05 +0100)]
dnd: Introduce gdk_drop_read_async() and use it

This is the replacement for selection usage.

Backend implementations for X11 (missing support for backwards compat
formats like COMPOUND_TEXT) and Wayland are included.

GTK code should be adapted to use gdk_drop_read_*() functions instead
of gtk_drag_get_data().

8 years agogdk: Fix wrong usage of g_task_propagate_pointer()
Benjamin Otte [Sun, 10 Dec 2017 00:04:32 +0000 (01:04 +0100)]
gdk: Fix wrong usage of g_task_propagate_pointer()

The return value is transfer full, not transfer none.

8 years agoclipboard: Add the useful stuff from reverted commit
Benjamin Otte [Tue, 5 Dec 2017 04:16:49 +0000 (05:16 +0100)]
clipboard: Add the useful stuff from reverted commit

This is the parts of dc50e0637ffa8bc7a369d00a5d8e7656d03c3781 that
should have been committed but were reverted in
b5c62cf86fe37e05ce2a0ae050df2a229457676b to unbreak the build.

8 years agodnd: Add gdk_drag_context_get_display()
Benjamin Otte [Tue, 5 Dec 2017 16:30:58 +0000 (17:30 +0100)]
dnd: Add gdk_drag_context_get_display()

Also turn it into a readable, construct-only property.

Every GDK object should have this. (Apart from GdkDisplay, obviously.)

8 years agogdk: Include gio.h in gdktypes.h
Benjamin Otte [Tue, 5 Dec 2017 14:44:00 +0000 (15:44 +0100)]
gdk: Include gio.h in gdktypes.h

It's where we include all our external dependencies.

This way, we don't have to include it in all headers again and again.

8 years agogtkwindow: Allow edge resizing from corners if constraints forbid either side
Carlos Garnacho [Sat, 9 Dec 2017 20:13:05 +0000 (21:13 +0100)]
gtkwindow: Allow edge resizing from corners if constraints forbid either side

The fix is twofold. First, when checking that a corner is resizable, we must
check the constraints on both edges. Second, when checking either edge we
must include both perpendicular sides in order to allow those to be
resizable when the constraint does not allow resizing the edge being
checked.

8 years agogtkwindow: Use shadow border when calculating resize areas positions
Carlos Garnacho [Sat, 9 Dec 2017 16:33:44 +0000 (17:33 +0100)]
gtkwindow: Use shadow border when calculating resize areas positions

This way resize areas are correctly positioned right outside the visible
window edge on all sides.

8 years agogtkwindow: Do not account handle size when checking content area
Carlos Garnacho [Sat, 9 Dec 2017 16:32:02 +0000 (17:32 +0100)]
gtkwindow: Do not account handle size when checking content area

This is necessary to bring back the L-shaped resize corners. On all edges
(not corners) the handle width is determined by the border size.

8 years agoFix some parameter name mismatches to make g-ir-scanner happier
Rico Tzschichholz [Sat, 9 Dec 2017 14:36:35 +0000 (15:36 +0100)]
Fix some parameter name mismatches to make g-ir-scanner happier

8 years agoSwitch the order for cursor lookup
Matthias Clasen [Sat, 9 Dec 2017 13:33:21 +0000 (08:33 -0500)]
Switch the order for cursor lookup

When looking for the cursor to apply, start from the innermost
widget and go up. This is the right behavior for cases like
entry icons. The top-down order we were using so far is the
right behavior for cases like global wait cursors. Since we
have entry icons in gtk, but not global wait cursors, lets
pick the other order for now.

8 years agotreeview: Don't draw background twice
Timm Bäder [Fri, 8 Dec 2017 15:46:46 +0000 (16:46 +0100)]
treeview: Don't draw background twice

This is done unconditionally for all widgets these days.

8 years agorecorder: Show rounded clip node corner size info
Timm Bäder [Wed, 6 Dec 2017 14:54:19 +0000 (15:54 +0100)]
recorder: Show rounded clip node corner size info

8 years agosnapshot: Don't create blur nodes with radius 0
Timm Bäder [Fri, 8 Dec 2017 15:58:06 +0000 (16:58 +0100)]
snapshot: Don't create blur nodes with radius 0

8 years agosnapshot: Collapse color matrix nodes
Timm Bäder [Wed, 6 Dec 2017 14:53:15 +0000 (15:53 +0100)]
snapshot: Collapse color matrix nodes

Color matrix nodes as the child of other color matrix nodes can happen
quite frequently as a result of CSS. To ease the renderer
implementations, collapse chains of color matrix nodes into one.

8 years agoFix a few overlooked casts
Timm Bäder [Sat, 9 Dec 2017 12:14:00 +0000 (13:14 +0100)]
Fix a few overlooked casts

glib warns about these now.

8 years agopaned: Grab during the drag
Matthias Clasen [Sat, 9 Dec 2017 02:09:24 +0000 (21:09 -0500)]
paned: Grab during the drag

This is necessary to ensure we get the right cursor.

8 years agocssshadowvalue: don't apply the y_scale offset twice to the shadow
Marco Trevisan (Treviño) [Thu, 7 Dec 2017 22:00:01 +0000 (17:00 -0500)]
cssshadowvalue: don't apply the y_scale offset twice to the shadow

As per commit 942e904 this changed causing a regression that
seems to be visible only when scale > 2.

https://bugzilla.gnome.org/show_bug.cgi?id=791363

8 years agoFix fallout from g_object_ref change
Matthias Clasen [Fri, 8 Dec 2017 22:48:47 +0000 (17:48 -0500)]
Fix fallout from g_object_ref change

g_object_ref now returns the type of the object that was
passed. Introduce cast as necessary to avoid warnings due
to this.

8 years agocss node tests: Update expected output
Timm Bäder [Fri, 8 Dec 2017 20:07:41 +0000 (21:07 +0100)]
css node tests: Update expected output

8 years agoFix fallout from the show-close-button rename
Matthias Clasen [Fri, 8 Dec 2017 16:29:14 +0000 (11:29 -0500)]
Fix fallout from the show-close-button rename

I had overlooked ui files. We should really
validate those during build.

8 years agomir: Fix potential use of NULL GDBusConnection
Philip Withnall [Fri, 17 Nov 2017 10:32:02 +0000 (10:32 +0000)]
mir: Fix potential use of NULL GDBusConnection

If we fail to connect to the session bus, it would be a bit silly to
immediately try and use that NULL connection.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=668590

8 years agoRename GtkHeaderBar::show-close-button
Matthias Clasen [Fri, 8 Dec 2017 03:36:29 +0000 (22:36 -0500)]
Rename GtkHeaderBar::show-close-button

It is about all window buttons, so rename it to ::show-title-buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=779862

8 years agowayland: Destroy the xdg_imported after the wl_surface
Jonas Ådahl [Fri, 1 Dec 2017 08:03:34 +0000 (16:03 +0800)]
wayland: Destroy the xdg_imported after the wl_surface

This way the window manager can handle destruction while having the
transient-for relationship still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=791062

8 years agowayland: Maybe postpone xdg-foreign state setup until mapping
Jonas Ådahl [Fri, 1 Dec 2017 04:18:30 +0000 (12:18 +0800)]
wayland: Maybe postpone xdg-foreign state setup until mapping

In order to map a window with the correct initial parent-child
relationship when a modal dialog is set up to be a child of an imported
foreign window, the relationship must be set up before the window is
mapped.

In order to do this, if a window is not yet mapped, postpone the
relationship setup until when the window is eventually mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=791062

8 years agoplacesview: Present FUSE-reachable network shares in Other Locations
Colin Leroy [Tue, 12 Sep 2017 13:32:36 +0000 (15:32 +0200)]
placesview: Present FUSE-reachable network shares in Other Locations

The documentation about gtk_file_chooser_set_local_only() states
that "non-native files may still be available using the native
filesystem via a userspace filesystem (FUSE)."
The code that made this possible in GTK+2 was missing from GTK+3 and
that represented a regression for Linux users in numerous applications
(Firefox, Thunderbird, Chromium, ...)

https://bugzilla.gnome.org/show_bug.cgi?id=787128

8 years agogdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD
Carlos Garnacho [Mon, 27 Nov 2017 20:39:05 +0000 (21:39 +0100)]
gdk: Add GDK_SEAT_CAPABILITY_TABLET_PAD

Tablet pads don't adapt really well to any other capability, so add a
distinct one to be able to query those properly.

https://bugzilla.gnome.org/show_bug.cgi?id=790920

8 years agogdk: Add gdk_seat_get_master_pointers()
Carlos Garnacho [Mon, 27 Nov 2017 19:21:42 +0000 (20:21 +0100)]
gdk: Add gdk_seat_get_master_pointers()

Traditionally (and on most backends) there's a single master pointer driven
by all pointing devices. The notable exception is Wayland though, where
master pointing devices are created per capability in the case of
pointer/touch, and one for each drawing tablet.

This function call makes it easy to access all these.

https://bugzilla.gnome.org/show_bug.cgi?id=790920

8 years agoMove editing to button release
Matthias Clasen [Fri, 8 Dec 2017 02:25:10 +0000 (21:25 -0500)]
Move editing to button release

This will free up primary button press for drags.

8 years agoMake sure stopped spinner stay visible
Matthias Clasen [Thu, 7 Dec 2017 04:49:03 +0000 (23:49 -0500)]
Make sure stopped spinner stay visible

This demo needs stopped spinners to be visible,
so the user can interact with them.

8 years agoFix a typo in the docs
Matthias Clasen [Thu, 7 Dec 2017 04:39:27 +0000 (23:39 -0500)]
Fix a typo in the docs

8 years agoAdd a Cut menuitem to the dnd demo
Matthias Clasen [Thu, 7 Dec 2017 04:36:35 +0000 (23:36 -0500)]
Add a Cut menuitem to the dnd demo

8 years agoMore work on the dnd demo
Matthias Clasen [Thu, 7 Dec 2017 04:10:56 +0000 (23:10 -0500)]
More work on the dnd demo

Still no dnd in the drag-and-drop demo...

8 years agopaned: Restrict picking to allocation
Timm Bäder [Wed, 6 Dec 2017 07:23:03 +0000 (08:23 +0100)]
paned: Restrict picking to allocation

Same reason as GtkViewport does it: We might allocate child widgets
outside of the paned's content allocation. For drawing, we add a clip
node.

This was causing the "Record" button in the inspector recorder to ignore
pointer events since the treeview column header label in the GtkPaned
was swallowing it.

8 years agoRemove all gtk_widget_get_content_size usages
Timm Bäder [Wed, 6 Dec 2017 06:56:12 +0000 (07:56 +0100)]
Remove all gtk_widget_get_content_size usages

And remove the function itself. Make everything use gtk_widget_get_width
and gtk_widget_get_height instead.

8 years agoAdd some copy-paste for widgets demo
Matthias Clasen [Wed, 6 Dec 2017 01:45:39 +0000 (17:45 -0800)]
Add some copy-paste for widgets demo

Not sure this is quite right yet.

8 years agoStart a dnd demo
Matthias Clasen [Wed, 6 Dec 2017 00:22:06 +0000 (16:22 -0800)]
Start a dnd demo

Nothing to see yet.

8 years agoUpdate gtk docs for recent changes
Matthias Clasen [Tue, 5 Dec 2017 16:56:09 +0000 (08:56 -0800)]
Update gtk docs for recent changes

Clipboards are gone, textures appear...

8 years agoDrop get/set_scale_factor from gsk docs
Matthias Clasen [Tue, 5 Dec 2017 16:37:18 +0000 (08:37 -0800)]
Drop get/set_scale_factor from gsk docs

They no longer exist.

8 years agobroadway: Add broadway_server_lookup_surface helper
Alexander Larsson [Tue, 5 Dec 2017 15:10:06 +0000 (16:10 +0100)]
broadway: Add broadway_server_lookup_surface helper

8 years agobroadway: Make the use of next_texture_id clearer
Alexander Larsson [Tue, 5 Dec 2017 14:54:36 +0000 (15:54 +0100)]
broadway: Make the use of next_texture_id clearer

It used to actually be pre-incremented, so meant like "one before
next id".

8 years agobroadway: Use "surface" instead of window/toplevel for browser object
Alexander Larsson [Tue, 5 Dec 2017 13:38:57 +0000 (14:38 +0100)]
broadway: Use "surface" instead of window/toplevel for browser object

Als fixes indentation/tabs and removes some unused code.

8 years agobroadway: Remove references to unused BROADWAY_EVENT_DELETE_NOTIFY
Alexander Larsson [Tue, 5 Dec 2017 13:32:56 +0000 (14:32 +0100)]
broadway: Remove references to unused BROADWAY_EVENT_DELETE_NOTIFY

8 years agobroadway: Remove now unused toplevel surface
Alexander Larsson [Mon, 4 Dec 2017 14:04:48 +0000 (15:04 +0100)]
broadway: Remove now unused toplevel surface

8 years agoautocleanups: allow g_autoptr() usage with GtkTreePath
Christian Hergert [Tue, 5 Dec 2017 03:22:40 +0000 (19:22 -0800)]
autocleanups: allow g_autoptr() usage with GtkTreePath

As the summary says, this allows using g_autoptr(GtkTreePath). This is
useful for API that uses out parameters for GtkTreePath that need to be
freed.

https://bugzilla.gnome.org/show_bug.cgi?id=791234

8 years agoEnsure that the path is always set
Emmanuele Bassi [Tue, 5 Dec 2017 11:07:46 +0000 (11:07 +0000)]
Ensure that the path is always set

We are using `path` unconditionally, but it can be conditionally filled.
To avoid inconsistent internal state, and a compiler warning, let's
assert that the variable is always set.

8 years agoFix the build
Emmanuele Bassi [Tue, 5 Dec 2017 11:02:20 +0000 (11:02 +0000)]
Fix the build

Use the right argument name in the preconditions check.

8 years agogdk: Documentation improvements
Matthias Clasen [Tue, 5 Dec 2017 07:52:48 +0000 (23:52 -0800)]
gdk: Documentation improvements

8 years agodocs: Drop some no longer existing functions
Matthias Clasen [Tue, 5 Dec 2017 04:38:04 +0000 (20:38 -0800)]
docs: Drop some no longer existing functions

8 years agoRevert "clipboard: Add gdk_clipboard_set()"
Matthias Clasen [Tue, 5 Dec 2017 07:09:54 +0000 (23:09 -0800)]
Revert "clipboard: Add gdk_clipboard_set()"

This reverts commit dc50e0637ffa8bc7a369d00a5d8e7656d03c3781.

This broke the build.

8 years agoclipboard: Add gdk_clipboard_set()
Benjamin Otte [Tue, 5 Dec 2017 04:16:49 +0000 (05:16 +0100)]
clipboard: Add gdk_clipboard_set()

This API allows specifying a GType and va_args of a value of that type
to set the clipboard contents. This massively simplifies setting weird
object types into the clipboard.
2 example patches included in this patch are the GtkTextBuffer and the
file list in the file chooser.

Using gobject-introspection, this should work without specifying the
type, so that you can literlally say
  clipboard.set ("Hello World")
or
  clipboard.set (pixbuf)
which is why I've also marked all other setters as (skip). They just
exist in C as wrappers for type safety reasons.

8 years agodnd: Remove x/y coordinates from drag-data-received
Benjamin Otte [Tue, 5 Dec 2017 03:06:20 +0000 (04:06 +0100)]
dnd: Remove x/y coordinates from drag-data-received

This is in preparation of using input streams to show that these
coordinates aren't needed most of the time and can otherwise be saved
during GtkWidget::drag-drop.

8 years agoExpand the docs
Matthias Clasen [Tue, 5 Dec 2017 00:18:24 +0000 (16:18 -0800)]
Expand the docs

Cross-reference the serializers.

8 years agoDocument gdk_content_provider_contents_changed
Matthias Clasen [Tue, 5 Dec 2017 00:08:32 +0000 (16:08 -0800)]
Document gdk_content_provider_contents_changed

8 years agogdk: Expand the clipboard documentation
Matthias Clasen [Tue, 5 Dec 2017 00:06:02 +0000 (16:06 -0800)]
gdk: Expand the clipboard documentation

8 years agogdk: Fill in some blanks in the docs
Matthias Clasen [Mon, 4 Dec 2017 23:58:30 +0000 (15:58 -0800)]
gdk: Fill in some blanks in the docs

This is just an initial cut; more work is needed.